package cn.tedu.charging.cost.dao.repository.impl;

import cn.tedu.charging.cost.dao.mapper.CostRuleMapper;
import cn.tedu.charging.cost.dao.repository.CostRuleRepository;
import cn.tedu.charging.cost.pojo.po.CostRulePO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class CostRuleRepositoryImpl implements CostRuleRepository {

    @Autowired
    private CostRuleMapper costRuleMapper;

    @Override
    public List<CostRulePO> getCostRuleByStationId(Integer stationId) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("station_id", stationId);
        return costRuleMapper.selectList(queryWrapper);
    }
}
